{include file="public/header" /}

<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-body">
            <!-- <fieldset
              id="searchFieldset_currentTableRenderId"
              class="table-search-fieldset"
            >
              <legend>条件搜索</legend>
              
            </fieldset> -->
            <!-- <a title="我已全部阅读" onclick="open_status(this,'/shop/message_status')" href="javascript:;"
              class="layui-btn-danger layui-btn layui-btn-sm">
              我已全部阅读
            </a> -->
          </div>
          <div class="layui-card-body layui-row layui-col-space10">
            共有数据：<strong id="count">{$list->total()}</strong> 条
          </div>
          <div class="layui-table-body layui-table-main">
            <table class="layui-table">
              <thead>
                <tr>
                  <th>
                    <div class="layui-table-cell">ID</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">任务操作前状态</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">目前状态</div>
                  </th>
                  <!-- <th>
                    <div class="layui-table-cell">文本说明</div>
                  </th> -->
                  <th>
                    <div class="layui-table-cell">操作时间</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">状态</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">操作</div>
                  </th>
                </tr>
              </thead>
              <tbody>
                {foreach $list as $v}
                <tr>
                  <td>
                    <div class="layui-table-cell">{$v.id}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.schedule_text}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.eschedule_text}({$v.eschedule_text2})</div>
                  </td>
                  <!-- <td>
                    <div class="layui-table-cell">{$v.text}</div>
                  </td> -->
                  <td>
                    <div class="layui-table-cell">{$v.created}</div>
                  </td>
                  <td>
                    {if $v.yue == 1}
                    <button type="button" class="layui-btn layui-btn-xs layui-btn-danger">未读</button>
                    {else}
                    <button type="button" class="layui-btn layui-btn-xs layui-btn-normal">已读</button>
                    {/if}
                  </td>
                  <td class=" layui-table-col-special">
                      <div class="layui-table-cell">
                        <a title="查看任务单" onclick="open_add('查看任务单','/shop/shoplist?id={$v.orderid}')"
                          href="javascript:;" class="layui-btn layui-btn-sm">
                          查看任务单
                        </a>
                      </div>
                  </td>
                </tr>
                {/foreach}
              </tbody>
            </table>
          </div>
          <div class="layui-card-body">
            <div class="page">{$list->render()|raw}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
  {include file="public/footer"}
  <script>
    layui.use(['form', 'layer'], function () {
      $ = layui.jquery;
      var form = layui.form
        , layer = layui.layer;
      getajax();
      //监听省份选择
      function getajax() {
        //发异步，把数据提交给php
        $.ajax({
          type: 'post',
          url: '/shop/message_status',
          success: function (res) { }
        });
      }

    });
  </script>
</body>